<template>
  <div id="app">
    <template v-if="whiteList.indexOf($route.path) === -1">
      <router-view v-if="ifInit" />
      <Init v-else />
    </template>
    <router-view v-else />
  </div>
</template>

<script>
import {
  mapState,
} from 'vuex'

import Init from '@/components/Initialize.vue'
import router from '@/router'
export default {
  name: 'Home',
  components: {
    Init,
  },

  computed: {
    ...mapState([
      'ifInit',
    ]),
  },
  data () {
    return {
      whiteList: [
        '/login',
      ],
    }
  },

  mounted () {
    this.$nextTick(()=>{
      console.log('当前路由=>', router.app._route.name)
    })
    setTimeout(() => {
      console.log('当前路由=>', router.app._route.name)

    }, 150)
    if (router.app._route.name == 'Login') return
    this.$store.dispatch('checkInit')
  },
}
</script>

<style lang="less">
@charset "utf-8";
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  .glo-content-area.glo-pagenation.ivu-page .ivu-page-item-jump-next:after, .ivu-page-item-jump-prev:after{
    // content: "•••"!important;
    content: "\2022\2022\2022"!important;
    // content: "\u2022\u2022\u2022"!important;
  }
}

.ivu-table-sort i{
  font-size: 20px !important ;
}
.ivu-table-sort i:first-child{
  top: -1px;
}
</style>
